/**
 * 定时推送服务
 * Created by 于璧毓.
 */
'use strict';
angular.module('app')
    .factory('messageModelServices', ['$modal', function ($modal) {
        return {
            /**
             * 定时推送服务
             * @param id 名片id
             * @param state 使用状态：0更新 1录入 2验证 3查看
             * @returns {HttpPromise}
             */
            addMessage: function () {
                var modalInstance = $modal.open({
                    templateUrl: 'tpl/push/messageModelController.html',
                    controller: 'messageModalCtrl',
                    size: "lg",
                    resolve: {

                    }
                })

                return modalInstance.result;
            }
        };
    }]);

app.controller('messageModalCtrl',['$scope', '$rootScope', '$modalInstance',
  function ($scope, $rootScope, $modalInstance){
    $scope.cancelModal = function(){
      $modalInstance.dismiss('cancel');
    }
  }]);